package com.uchengwang.ui.cm_ui.uu.ui;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;

import com.flyco.tablayout.SlidingTabLayout;
import com.uchengwang.R;
import com.uchengwang.ui.base_ui.ui.BaseWithTitleActivity;
import com.uchengwang.ui.cm_ui.uu.fm.GroupApplyFragment;
import com.uchengwang.ui.cm_ui.uu.fm.GroupInviteFragment;

import java.util.ArrayList;

/**
 * Created by U城网 on 2017/10/22.
 * 别人对你的群邀请 申请信息
 */

public class GroupNotifyActivity extends BaseWithTitleActivity{
    private String[] clubTitles = {"群申请", "群邀请"};
    private SlidingTabLayout uclub_fg_tab;
    private ViewPager uclub_fm_viewpager;
    private ArrayList<Fragment> fragmentList = new ArrayList<>();

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_school_news);
        setTitle("群通知");

        initView();
    }

    private void initView() {
        uclub_fg_tab = (SlidingTabLayout) findViewById(R.id.schoolNews_tab);
        uclub_fm_viewpager = (ViewPager) findViewById(R.id.schoolNews_pager);

        initData();

    }
    private void initData(){
        if (fragmentList.size() >0){
            fragmentList.clear();
        }
        fragmentList.add(new GroupApplyFragment());
        fragmentList.add(new GroupInviteFragment());

        uclub_fg_tab.setViewPager(uclub_fm_viewpager,clubTitles, this, fragmentList);

    }
}
